<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="Access-Control-Allow-Origin" content="*" />
    <meta http-equiv="Access-Control-Allow-Headers" content="X-Requested-With" />
    <meta http-equiv="Access-Control-Allow-Methods" content="PUT,POST,GET,DELETE,OPTIONS" />
    <title>答题</title>
    <script src="http://code.jquery.com/jquery-3.2.1.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css" media="all">
    <script type="text/javascript" src="/static/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="/static/css/bootstrap.min.css">

    <link rel="stylesheet" href="//g.alicdn.com/de/prismplayer/2.4.0/skins/default/aliplayer-min.css" />
    <script type="text/javascript" src="//g.alicdn.com/de/prismplayer/2.4.0/aliplayer-min.js"></script>
</head>
<body>
    <div class="prism-player" id="J_prismPlayer" style="position: absolute"></div>
    <script>
        var player = new Aliplayer({
            id: 'J_prismPlayer',
            width: '100%',
            autoplay: false,
//支持播放地址播放,此播放优先级最高
            source : 'http://admin.gxdati.com/storage/20220124/7c8a12e0b7faef7a33d28fe3c4cc14b2.mp4',
//播放方式二：点播用户推荐
//             vid : '1e067a2831b641db90d570b6480fbc40',
//             playauth : '',
//             cover: 'http://liveroom-img.oss-cn-qingdao.aliyuncs.com/logo.png',
//播放方式三：仅MTS用户使用
//             vid : '1e067a2831b641db90d570b6480fbc40',
//             accId: '',
//             accSecret: '',
//             stsToken: '',
//             domainRegion: '',
//             authInfo: ''
        },function(player){
            console.log('播放器创建好了。')
        });
    </script>

</body>
</html>
<script type="text/javascript">
    layui.use(['form'],function(){
        form = layui.form;
        $ = layui.jquery;
    });
    function save(){
        $.post('/api/apply',$('form').serialize(),function(res){
            if(res.code == 0){
                layer.msg(res.message,{'icon':1});
                //1s后跳转答题页面
                setTimeout(function(){
                    // 跳转到答题页面
                    // window.location.href = '/index/question'; //可以后退
                    window.location.replace('/index/question');  //不可以后退
                },1000);
            }else{
                layer.msg(res.message,{'icon':2});
            }
        },'json');
    }
</script>